package com.spring.collection;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * @ClassName: test
 * @Description: TODO
 **/
public class test {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("/applicationContext.xml");
        Collection bean = context.getBean(Collection.class);
        List<String> list = bean.getList();
        for(String ele : list){
            System.out.println(ele);
        }

        Set<String> set = bean.getSet();
        for(String ele : set){
            System.out.println(ele);
        }

        Map<String, String> map = bean.getMap();
        Set<String> keySet = map.keySet();
        for(String key : keySet){
            System.out.println(map.get(key));
        }

        Properties prop = bean.getProp();
        System.out.println(prop.getProperty("pp"));


    }
}
